﻿using Xioa_UI.Attribute;
using Xioa_UI.Domain;

namespace Xioa_UI_Demo.Model;

[Nesting(useDescription: "Temp1", scope: "ex1")]
public class ModelTemp1: IAlternateNesting<string>
{
    public  void DoWork()
    {
        throw new NotImplementedException();
    }

    public  void DoWork(string data)
    {
        throw new NotImplementedException();
    }

    public (string, string, bool) GetNestRunningString(string value)
    {
        return value is "temp1" ? ("Temp1","ex1",true) : ("", "", false);
    }
}

[Nesting(useDescription: "Temp2", scope: "ex2")]
public class ModelTemp2 : IAlternateNesting<string, string>
{
    public  string? DoWorkResult()
    {
        throw new NotImplementedException();
    }

    public  string? DoWorkResult(string data)
    {
        throw new NotImplementedException();
    }

    public (string, string, bool) GetNestRunningString(string value)
    {
        return value is "temp2" ? ("Temp2","ex2",true) : ("", "", false);
    }
}

[Nesting(useDescription: "Temp2", scope: "ex3")]
public class ModelTemp3 : IAlternateNesting<string, string>
{
    public  string? DoWorkResult()
    {
        throw new NotImplementedException();
    }

    public  string? DoWorkResult(string data)
    {
        throw new NotImplementedException();
    }

    public (string, string, bool) GetNestRunningString(string value)
    {
        return value is "temp3" ? ("Temp2","ex3",true) : ("", "", false);
    }
}